package com.tvunetworks.center.device.mapper;

import com.tvunetworks.center.common.model.param.search.SlugInfo;
import com.tvunetworks.center.device.model.GridMetadata;
import com.tvunetworks.center.device.model.vo.GridSlugVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;


/**
 * @author lebronchen
 * @program: tvucc-aggregator
 * @create: 2019-11-05 14:45
 **/
public interface GridMetadataMapper extends Mapper<GridMetadata> {


    /**
     * @param peerIds peerIds
     * @return java.util.List<com.tvunetworks.center.device.model.vo.GridSlugVo>
     * @throws Exception if has error
     * @author KevinLi
     * @date 12/7/2021
     */
    List<GridSlugVo> slugList(List<String> peerIds);

    /**
     * @param peerId peerId
     * @param slug   slug
     * @return int
     * @throws Exception if has error
     * @author KevinLi
     * @date 12/7/2021
     */
    int updateGridSlug(@Param("peerId") String peerId, @Param("slug") String slug);

    /**
     * @param list list
     * @return int
     * @throws Exception if has error
     * @author KevinLi
     * @date 12/7/2021
     */
    int synGridSlug(List<SlugInfo> list);

    /**
     *  查询全部的Grid
     * @return List
     */
    List<String> allGridIds();

}
